# Maintainer: Ryan Barnett <ryanbarnett3@gmail.com>
pkgname=opkg
pkgver=0.7.0
pkgrel=0
pkgdesc="Lightweight package management system"
url="https://git.yoctoproject.org/opkg/"
arch="all"
license="GPL-2.0-or-later"
makedepends="curl-dev gpgme-dev libarchive-dev zstd-dev autoconf automake libtool pkgconf"
subpackages="$pkgname-dev $pkgname-libs $pkgname-doc"
source="https://downloads.yoctoproject.org/releases/opkg/opkg-$pkgver.tar.gz
	skip-test-regress-issue72.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-zstd
	make
}

check() {
	# Tests cannot be run in parallel, must be sequential
	make -j 1 check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
e6b6510b7cd3b61d8b61db552a684f5aaa6c2ba3e572da901151277fe8de9d4a39819f8cf23c42614a2ae8a01b409a334f86ac167fb7bafea833a3a9a0a06b74  opkg-0.7.0.tar.gz
78c4d17cf2a8df4774706f811c3928f68ee1dd62c9d6cf93af9cf52bf8da8e50a2f80ed4808bed6e177d32ebaa5ffa196fb721cdebcc9047a6dc3ac4fe8c5285  skip-test-regress-issue72.patch
"
